//
//  JJHomepagePresenter.m
//  iosDemo
//
//  Created by gongjian on 2018/12/14.
//  Copyright © 2018 JJ. All rights reserved.
//

#import "JJHomepagePresenter.h"

#import "JJHomepageService.h"
#import "JJServiceManager.h"
#import "JJHomepageModel.h"

@implementation JJHomepagePresenter

- (void)requestGetWeather:(void (^)(JJHomepageModel *object, id otherinfo))networkSuccessResponse
	  networkFailResponse:(void (^)(NSError *error, id otherinfo))networkFailResponse {
	[JJ_SERVICE(JJHomepageService) requestGetWeather:^(JJHomepageModel * _Nonnull object, id  _Nonnull otherinfo) {
		if ([object isValid]) {
			self.errMsg = object.errMsg;
		}
		networkSuccessResponse(object, otherinfo);
	} networkFailResponse:networkFailResponse];
}

@end
